package com.huawei.appgallery.forum.section.fragment;

import android.app.Activity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.huawei.appgallery.foundation.ui.framework.cardframe.fragment.TaskFragment;
import com.huawei.appgallery.foundation.ui.framework.fragment.LoadingFragment;
import o.bqx;
import o.FragmentManager;
import o.FragmentTransaction;

public class SectionLoadingFragment extends LoadingFragment {
    private d ॱ;

    public interface d {
        void ˋ(View view);
    }

    public void ˊ(d dVar) {
        this.ॱ = dVar;
    }

    public TaskFragment ˋ(FragmentManager juVar, int i, String str) {
        FragmentTransaction ˊ = juVar.ˊ();
        try {
            ˊ.ˏ(i, this, str).ˋ();
            ˊ.ˏ();
        } catch (Exception e) {
            bqx.ˋ("SectionLoadingFragment", "show fragment appers IllegalStateException.");
        }
        return this;
    }

    public void ॱ(Activity activity) {
        e ʼʼ = ʼʼ();
        super.ॱ(activity);
        if (ʼʼ() instanceof Activity) {
            ˊ(ʼʼ);
        }
    }

    public View ˋ(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        View ˋ = super.ˋ(layoutInflater, viewGroup, bundle);
        if (this.ॱ != null) {
            this.ॱ.ˋ(ˋ);
        }
        return ˋ;
    }
}
